
import {defZFormFieldCom} from "@/zform/render";

defZFormFieldCom('CusCom', {
  create(propConfig) {
    return {
      template: `
        <div style="display: flex; align-items: center; gap: 10px;">
        <div>这是自定义的组件</div>
        <div>
          <el-input
              v-model="value"
              @change="zfield__onInput"
              v-bind="ui.widgetConfig"
          ></el-input>
        </div>
        <div>CusCom</div>
        </div>`,
      watch: {
        value: {
          handler(newVal) {
            console.log('value', newVal)
          }
        }
      },
      data() {
        return {
          value: undefined,
          ui: propConfig.ui,
        }
      }
    }
  }
})

import {createDemoPage} from "../plugins/example/page";

export default createDemoPage()
